package com.example.novelstory.service.qjl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.novelstory.dao.qjl.VipuserDao;
import com.example.novelstory.entity.VipUser;
import java.util.List;
import org.springframework.stereotype.Service;

@Service
//全查
public class VipUserServiceImpl extends ServiceImpl<VipuserDao, VipUser> {
    public List<VipUser> findAll1() {
//        List<User> userList = userDao.findAll();
        return list();
    }
    //添加
    public boolean addVipuser(VipUser vipuser) {

        return save(vipuser);
    }
    //删除
    public boolean deleteVipuser(int id){

        return removeById(id);
    }
    //修改
    public boolean updateVipuser(VipUser vipuser){

        QueryWrapper queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("username",vipuser.getUsername());
        return update(vipuser,queryWrapper);
    }
}